package es.wandererteam.tapakitty.bussines;

import java.awt.ItemSelectable;
import java.math.BigInteger;

import android.util.Log;

public class GameStatus {
	public static BigInteger CurrentNyansNumber = new BigInteger("0");
	public static double NYANS_PER_SECOND = 0;
	
	public static int[] ITEMS = {0, 0, 0, 0, 0};
	public static int[] ITEMS_NYAN = {1, 2, 5, 10, 50};
	public static int[] ITEMS_PRICE = {10, 100, 200, 1000, 2000};
	
	/*public static int RIBBONS = 0;
	public static double RIBBON_NYAN = 1;
	public static int RIBBON_PRICE = 50;
	
	public static int BELLS = 0;
	public static double BELL_NYAN = 2;
	public static int BELL_PRICE = 100;
	
	public static int FARM = 0;
	public static double FARM_NYAN = 3;
	public static int FARM_PRICE = 200;
	
	public static int HELL = 0;
	public static int HELL_NYAN = 10;
	public static int HELL_PRICE = 1000;
	
	public static int HEAVEN = 0;
	public static double HEAVEN_NYAN = 40;
	public static int HEAVEN_PRICE = 2000;*/
	
	
	public static boolean BuyItem(int item){
		String cosa;
		BigInteger despuesResta = CurrentNyansNumber.subtract(new BigInteger(String.valueOf(ITEMS_PRICE[item]))); //restante despues de la compra
		//cosa = auxiliar.toString();
		if(despuesResta.compareTo(new BigInteger("0")) == -1){ //si es menor que 0 negar la compra
			return false;
		}
		CurrentNyansNumber = despuesResta;
		NYANS_PER_SECOND += ITEMS_NYAN[item];
		ITEMS[item]++;
		return true;
	}
	
	
}
